package com.yunxin.admin.system.application.command;

import com.yunxin.core.application.command.user.AddUserTeamCommand;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.util.List;

/**
 * @author zero°
 * @since 2023-06-01
 */
@Schema(description = "更新商户用户表单对象")
@Data
public class UpdateUserMerchantCommand {

    @Schema(description="用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long id;

    @Schema(description="昵称")
    private String nickname;

    @Schema(description="手机号码")
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$", message = "手机号码格式不正确")
    private String mobile;

    @Schema(description="性别")
    private Integer gender;

    @Schema(description="邮箱")
    private String email;

    @Schema(description = "备注")
    private String remark;

    @Schema(description="角色集合")
    private List<Long> roles;

//    @Schema(description="团队id")
//    private List<Long> teamIds;

    @Schema(description="团队信息")
    private List<AddUserTeamCommand> userTeamCommands;

    @Schema(description="权重id")
    private Integer weightId;


    @Schema(description="微信手机号")
    @Pattern(regexp = "^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$", message = "企微手机号码格式不正确")
    private String whechatMobile;
}
